package gamagora.game.entity
{
	import gamagora.game.resources.OSImages;
	
	import org.flixel.FlxParticle;

	public class OSSmoke extends OSEmitter
	{
		private var _minY:Number;
		
		public function OSSmoke(X:Number, Y:Number, nbParticles:Number, minY:Number, minX:Number = -1, maxX:Number = 1)
		{
			super(X, Y, nbParticles);
			
			_minY = minY;
			
			setYSpeed(-0.5, 0.5);
			setGravity(-10);
			setXSpeed(-2, 2);
			
			var particle:FlxParticle; 
			for (var i:int = 0; i < getMaxSize() / 2; i++)
			{
				particle = new FlxParticle();
				//particle.loadGraphic(OSImages.SMOKE);
				particle.makeGraphic(8, 8, 0xFF808080);
				particle.visible = false;
				addParticle(particle);
				
				particle = new FlxParticle();
				particle.makeGraphic(4, 4, 0xFF808080);
				particle.visible = false;
				addParticle(particle);
			}
			
			start(false, 10, .075);
		}
	}
}